package com.unify.python.http;

import org.apache.http.*;
import org.apache.http.message.BasicHeader;

import java.util.Map;
import java.util.Objects;
import java.util.Set;

/**
 * @Author: wchen
 * @Description:
 * @Date: Created in 2018-12-18 17:28
 * Copyright 本内容仅限于杭州阿拉丁信息科技股份有限公司内部传阅，禁止外泄以及用于其他的商业目的
 */
public class HttpRandomHeaderClient {


    /**
     * 构造请求头
     * @return
     */
    public static BasicHeader createUserAgentHeader(){
        BasicHeader header = new BasicHeader("User-Agent", getUserAgent());
        return header;
    }


    /**
     * 获取浏览器的User-Agent
     * @return
     */
    private static String getUserAgent(){
        return "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0";
    }

}
